# P351-P356
# def measure(temp, wet = 20):
#     """测量温度和湿度"""
#     print("测量开始...")
#     print("测量结束...")
#     return temp, wet
#
# gl_temp, gl_wet = measure(30)
# print(gl_temp)
# print(gl_wet)

# 多只参数案例--计算任意多个数字和
# 1、定义一个函数sum_numbers，可以接受的任意多个整数
# 2、将传递的所有数字累加并返回累加的结果
# def sum_numbers(*args):
#     # 定义求和变量
#     mul_nums = 0
#     for name in args:
#         mul_nums += name
#
#     return mul_nums
#
# print(sum_numbers(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))

# 拆包
def sum_numbers(*args):
    # 定义求和变量
    mul_nums = 0
    for name in args:
        mul_nums += name

    return mul_nums

print(sum_numbers(*(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)))    # 一个*号对元组进行拆包